Skip to content

Conversation

@Apollon77
Copy link
Collaborator

This PR updates the Plugin-base and Sentry to 3.x including relevant code changes to properly handle the logic on shutdown

@Apollon77
Copy link
Collaborator Author

Ok, current issues left:

  • the plugin-base typing is wrong because it only allows "system.adapter.*" as namespace and not "system.host" which is needed to use in controller scope
  • Somehow the base types for DBs are not matching the DB types in controller ...
Bildschirmfoto 2025-10-15 um 23 35 31

Copy link
Contributor

@GermanBluefox GermanBluefox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copilot AI review requested due to automatic review settings December 3, 2025 13:39
Copilot finished reviewing on behalf of Apollon77 December 3, 2025 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the plugin infrastructure to version 3.x, specifically updating @iobroker/plugin-base from ~2.0.1 to ~3.0.3 and @iobroker/plugin-sentry from ~2.0.4 to ~3.0.0. The major change is that plugin lifecycle methods (initPlugin, destroy, destroyAll) are now asynchronous and must be properly awaited.

Key changes:

  • All plugin lifecycle methods now return Promises and require await
  • Import paths changed from @iobroker/plugin-base/types to @iobroker/plugin-base
  • Enhanced shutdown logic in adapter.ts to handle async plugin destruction with race condition prevention
  • Type casting adjustments for plugin-base v3 API changes

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/types-dev/objects.d.ts Grammar improvements in JSDoc comments
packages/controller/src/main.ts Added await to plugin lifecycle methods; updated imports; changed Sentry plugin access pattern
packages/controller/package.json Updated plugin-base to ~3.0.3, plugin-sentry to ~3.0.0, debug to ^4.4.3
packages/cli/src/lib/setup/dbConnection.ts Added await to destroyAll; added type casting for config; updated imports
packages/cli/package.json Updated plugin-base to ~3.0.3, debug to ^4.4.3
packages/adapter/src/lib/adapter/adapter.ts Refactored terminate() with async shutdown logic; added await to all plugin methods; updated type declarations
packages/adapter/package.json Updated plugin-base to ~3.0.3
package-lock.json Updated dependencies including Sentry 10.x with OpenTelemetry support

@Apollon77 Apollon77 merged commit 38f3b48 into master Dec 3, 2025
25 checks passed
@Apollon77 Apollon77 deleted the plugin3-update branch December 3, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants